<!doctype html>



  


<html class="theme-next mist use-motion" lang="zh-Hans,zh-hk,en,fr-FR,ru,de,ja,id,ko,default">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  
    
      
    

    
  

  

  
    
      
    

    
  

  
    
      
    

    
  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Monda:300,300italic,400,400italic,700,700italic|Roboto Slab:300,300italic,400,400italic,700,700italic|Lobster Two:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Android,UI,界面,漫吧,Cartoon8," />





  <link rel="alternate" href="http://blog.csdn.net/qq_21265915/rss/list" title="WinterSmileSB101 的个人房间" type="application/atom+xml" />




  <link rel="shortcut icon" type="image/x-icon" href="/images/myHeadImg.jpeg?v=5.1.0" />






<meta name="description" content="版权声明：本文为 wintersmilesb101 -（个人独立博客– http://wintersmilesb101.online 欢迎访问）博主原创文章，未经博主允许不得转载。
项目 GitHub 地址

第一篇链接 漫吧漫画阅读界面的搭建（一）基础布局搭建（上）第二篇链接 漫吧漫画阅读界面的搭建（一）基础布局搭建（下）
这一篇是完整代码的展示，博文是前两篇方便起见，代码都为一个文件布局代码">
<meta property="og:type" content="article">
<meta property="og:title" content="漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）">
<meta property="og:url" content="http://WinterSmileSB101.online/2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/index.html">
<meta property="og:site_name" content="WinterSmileSB101 的个人房间">
<meta property="og:description" content="版权声明：本文为 wintersmilesb101 -（个人独立博客– http://wintersmilesb101.online 欢迎访问）博主原创文章，未经博主允许不得转载。
项目 GitHub 地址

第一篇链接 漫吧漫画阅读界面的搭建（一）基础布局搭建（上）第二篇链接 漫吧漫画阅读界面的搭建（一）基础布局搭建（下）
这一篇是完整代码的展示，博文是前两篇方便起见，代码都为一个文件布局代码">
<meta property="og:updated_time" content="2017-03-22T06:11:14.866Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）">
<meta name="twitter:description" content="版权声明：本文为 wintersmilesb101 -（个人独立博客– http://wintersmilesb101.online 欢迎访问）博主原创文章，未经博主允许不得转载。
项目 GitHub 地址

第一篇链接 漫吧漫画阅读界面的搭建（一）基础布局搭建（上）第二篇链接 漫吧漫画阅读界面的搭建（一）基础布局搭建（下）
这一篇是完整代码的展示，博文是前两篇方便起见，代码都为一个文件布局代码">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    sidebar: {"position":"right","display":"post","offset":12,"offset_float":0,"b2t":true,"scrollpercent":true},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '6376853978663093000',
      author: 'WinterSmileSB101'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://WinterSmileSB101.online/2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/"/>





  <title> 漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码） | WinterSmileSB101 的个人房间 </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  














  
  
    
  

  <div class="container sidebar-position-right page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">WinterSmileSB101 的个人房间</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <h1 class="site-subtitle" itemprop="description">胆小认生，不易相处</h1>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-commonweal">
          <a href="/404.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-heartbeat"></i> <br />
            
            公益404
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocapitalize="off" autocomplete="off" autocorrect="off"
             placeholder="搜索..." spellcheck="false"
             type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="http://WinterSmileSB101.online/2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="WinterSmileSB101">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="http://on792ofrp.bkt.clouddn.com/17-3-22/29073846-file_1490159480452_d2de.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="WinterSmileSB101 的个人房间">
    </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">
            
            
              
                漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）
              
            
          </h2>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-03-22T13:45:17+08:00">
                2017-03-22
              </time>
            

            
              <span class="post-meta-divider">|</span>
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-check-o"></i>
              </span>
              
                <span class="post-meta-item-text">更新于</span>
              
              <time title="更新于" itemprop="dateModified" datetime="2017-03-22T14:11:14+08:00">
                2017-03-22
              </time>
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Android/" itemprop="url" rel="index">
                    <span itemprop="name">Android</span>
                  </a>
                </span>

                
                
                  ， 
                
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Android/Android-实战/" itemprop="url" rel="index">
                    <span itemprop="name">Android 实战</span>
                  </a>
                </span>

                
                
                  ， 
                
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Android/Android-实战/Android-漫画App漫吧（自写爬虫）开发/" itemprop="url" rel="index">
                    <span itemprop="name">Android 漫画App漫吧（自写爬虫）开发</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          
             <span id="/2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/" class="leancloud_visitors" data-flag-title="漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="post-meta-item-text">阅读次数 </span>
               
                 <span class="leancloud-visitors-count"></span>
             </span>
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <blockquote>
<p>版权声明：本文为 wintersmilesb101 -（个人独立博客– <a href="http://wintersmilesb101.online">http://wintersmilesb101.online</a> 欢迎访问）博主原创文章，未经博主允许不得转载。</p>
<p><a href="https://github.com/WinterSmileSB101/Cartoon8" target="_blank" rel="external">项目 GitHub 地址</a></p>
</blockquote>
<p><a href="http://wintersmilesb101.online/2017/03/22/uibuilder-first-1/">第一篇链接 漫吧漫画阅读界面的搭建（一）基础布局搭建（上）</a><br><a href="http://wintersmilesb101.online/2017/03/22/%E6%BC%AB%E5%90%A7%E6%BC%AB%E7%94%BB%E9%98%85%E8%AF%BB%E7%95%8C%E9%9D%A2%E7%9A%84%E6%90%AD%E5%BB%BA%EF%BC%88%E4%B8%80%EF%BC%89%E5%9F%BA%E7%A1%80%E5%B8%83%E5%B1%80%E6%90%AD%E5%BB%BA%EF%BC%88%E4%B8%8B%EF%BC%89/#more">第二篇链接 漫吧漫画阅读界面的搭建（一）基础布局搭建（下）</a></p>
<h3 id="这一篇是完整代码的展示，博文是前两篇"><a href="#这一篇是完整代码的展示，博文是前两篇" class="headerlink" title="这一篇是完整代码的展示，博文是前两篇"></a>这一篇是完整代码的展示，博文是前两篇</h3><h3 id="方便起见，代码都为一个文件"><a href="#方便起见，代码都为一个文件" class="headerlink" title="方便起见，代码都为一个文件"></a>方便起见，代码都为一个文件</h3><h3 id="布局代码："><a href="#布局代码：" class="headerlink" title="布局代码："></a>布局代码：</h3><h3 id="主布局："><a href="#主布局：" class="headerlink" title="主布局："></a>主布局：</h3><figure class="highlight xml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div><div class="line">115</div><div class="line">116</div><div class="line">117</div><div class="line">118</div><div class="line">119</div><div class="line">120</div><div class="line">121</div><div class="line">122</div><div class="line">123</div><div class="line">124</div><div class="line">125</div><div class="line">126</div><div class="line">127</div><div class="line">128</div><div class="line">129</div><div class="line">130</div><div class="line">131</div><div class="line">132</div><div class="line">133</div><div class="line">134</div><div class="line">135</div><div class="line">136</div><div class="line">137</div><div class="line">138</div><div class="line">139</div><div class="line">140</div><div class="line">141</div><div class="line">142</div><div class="line">143</div><div class="line">144</div><div class="line">145</div><div class="line">146</div><div class="line">147</div><div class="line">148</div><div class="line">149</div><div class="line">150</div><div class="line">151</div><div class="line">152</div><div class="line">153</div><div class="line">154</div><div class="line">155</div><div class="line">156</div><div class="line">157</div><div class="line">158</div><div class="line">159</div><div class="line">160</div><div class="line">161</div><div class="line">162</div><div class="line">163</div><div class="line">164</div><div class="line">165</div><div class="line">166</div><div class="line">167</div><div class="line">168</div><div class="line">169</div><div class="line">170</div><div class="line">171</div><div class="line">172</div><div class="line">173</div><div class="line">174</div><div class="line">175</div><div class="line">176</div><div class="line">177</div><div class="line">178</div><div class="line">179</div><div class="line">180</div><div class="line">181</div><div class="line">182</div><div class="line">183</div><div class="line">184</div><div class="line">185</div><div class="line">186</div><div class="line">187</div><div class="line">188</div><div class="line">189</div><div class="line">190</div><div class="line">191</div><div class="line">192</div><div class="line">193</div><div class="line">194</div><div class="line">195</div><div class="line">196</div><div class="line">197</div><div class="line">198</div><div class="line">199</div><div class="line">200</div><div class="line">201</div><div class="line">202</div><div class="line">203</div><div class="line">204</div><div class="line">205</div><div class="line">206</div><div class="line">207</div><div class="line">208</div><div class="line">209</div><div class="line">210</div><div class="line">211</div><div class="line">212</div><div class="line">213</div><div class="line">214</div><div class="line">215</div><div class="line">216</div><div class="line">217</div><div class="line">218</div><div class="line">219</div><div class="line">220</div><div class="line">221</div><div class="line">222</div><div class="line">223</div><div class="line">224</div><div class="line">225</div><div class="line">226</div><div class="line">227</div><div class="line">228</div><div class="line">229</div><div class="line">230</div><div class="line">231</div><div class="line">232</div><div class="line">233</div><div class="line">234</div><div class="line">235</div><div class="line">236</div><div class="line">237</div><div class="line">238</div><div class="line">239</div><div class="line">240</div><div class="line">241</div><div class="line">242</div><div class="line">243</div><div class="line">244</div><div class="line">245</div><div class="line">246</div><div class="line">247</div><div class="line">248</div><div class="line">249</div><div class="line">250</div><div class="line">251</div><div class="line">252</div><div class="line">253</div><div class="line">254</div><div class="line">255</div><div class="line">256</div><div class="line">257</div><div class="line">258</div><div class="line">259</div><div class="line">260</div><div class="line">261</div><div class="line">262</div><div class="line">263</div><div class="line">264</div><div class="line">265</div><div class="line">266</div><div class="line">267</div><div class="line">268</div><div class="line">269</div><div class="line">270</div><div class="line">271</div><div class="line">272</div><div class="line">273</div><div class="line">274</div><div class="line">275</div><div class="line">276</div><div class="line">277</div><div class="line">278</div><div class="line">279</div><div class="line">280</div><div class="line">281</div><div class="line">282</div><div class="line">283</div><div class="line">284</div><div class="line">285</div><div class="line">286</div><div class="line">287</div><div class="line">288</div><div class="line">289</div><div class="line">290</div><div class="line">291</div><div class="line">292</div><div class="line">293</div><div class="line">294</div><div class="line">295</div><div class="line">296</div><div class="line">297</div><div class="line">298</div><div class="line">299</div><div class="line">300</div><div class="line">301</div><div class="line">302</div><div class="line">303</div><div class="line">304</div><div class="line">305</div><div class="line">306</div><div class="line">307</div><div class="line">308</div><div class="line">309</div><div class="line">310</div><div class="line">311</div><div class="line">312</div><div class="line">313</div><div class="line">314</div><div class="line">315</div><div class="line">316</div><div class="line">317</div><div class="line">318</div><div class="line">319</div><div class="line">320</div><div class="line">321</div><div class="line">322</div><div class="line">323</div><div class="line">324</div><div class="line">325</div><div class="line">326</div><div class="line">327</div><div class="line">328</div><div class="line">329</div><div class="line">330</div><div class="line">331</div><div class="line">332</div><div class="line">333</div><div class="line">334</div><div class="line">335</div><div class="line">336</div><div class="line">337</div><div class="line">338</div><div class="line">339</div><div class="line">340</div><div class="line">341</div><div class="line">342</div><div class="line">343</div><div class="line">344</div><div class="line">345</div><div class="line">346</div><div class="line">347</div><div class="line">348</div><div class="line">349</div><div class="line">350</div><div class="line">351</div><div class="line">352</div><div class="line">353</div><div class="line">354</div><div class="line">355</div><div class="line">356</div><div class="line">357</div><div class="line">358</div><div class="line">359</div><div class="line">360</div><div class="line">361</div><div class="line">362</div><div class="line">363</div><div class="line">364</div><div class="line">365</div><div class="line">366</div><div class="line">367</div><div class="line">368</div><div class="line">369</div><div class="line">370</div><div class="line">371</div><div class="line">372</div><div class="line">373</div><div class="line">374</div><div class="line">375</div><div class="line">376</div><div class="line">377</div><div class="line">378</div><div class="line">379</div><div class="line">380</div><div class="line">381</div><div class="line">382</div><div class="line">383</div><div class="line">384</div><div class="line">385</div><div class="line">386</div><div class="line">387</div><div class="line">388</div><div class="line">389</div><div class="line">390</div><div class="line">391</div><div class="line">392</div><div class="line">393</div><div class="line">394</div><div class="line">395</div><div class="line">396</div><div class="line">397</div><div class="line">398</div><div class="line">399</div><div class="line">400</div><div class="line">401</div><div class="line">402</div><div class="line">403</div><div class="line">404</div><div class="line">405</div><div class="line">406</div><div class="line">407</div><div class="line">408</div><div class="line">409</div><div class="line">410</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">RelativeLayout</span> <span class="attr">xmlns:android</span>=<span class="string">"http://schemas.android.com/apk/res/android"</span>  </span></div><div class="line">             <span class="attr">xmlns:tools</span>=<span class="string">"http://schemas.android.com/tools"</span>  </div><div class="line">             <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">             <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">                <span class="attr">android:background</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">             <span class="attr">tools:context</span>=<span class="string">"winter.zxb.smilesb101.cartoon8.WatchComicActivity"</span>&gt;  </div><div class="line">    <span class="comment">&lt;!-- The primary full-screen view. This can be replaced with whatever view  </span></div><div class="line">         is needed to present your content, e.g. VideoView, SurfaceView,  </div><div class="line">         TextureView, etc. --&gt;  </div><div class="line">    <span class="tag">&lt;<span class="name">android.support.v7.widget.RecyclerView</span>  </span></div><div class="line">        <span class="attr">android:id</span>=<span class="string">"@+id/fullscreen_content"</span>  </div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line">    <span class="comment">&lt;!--底部小的状态栏--&gt;</span>  </div><div class="line">    <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">        <span class="attr">android:id</span>=<span class="string">"@+id/small_status"</span>  </div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"30dp"</span>  </div><div class="line">        <span class="attr">android:layout_alignParentEnd</span>=<span class="string">"true"</span>  </div><div class="line">        <span class="attr">android:layout_alignParentBottom</span>=<span class="string">"true"</span>  </div><div class="line">        <span class="attr">android:background</span>=<span class="string">"@drawable/round_rect_pressed"</span>  </div><div class="line">        <span class="attr">android:orientation</span>=<span class="string">"horizontal"</span>&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/comic_name_bottom"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:layout_marginLeft</span>=<span class="string">"2dp"</span>  </div><div class="line">            <span class="attr">android:maxLines</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:textSize</span>=<span class="string">"12sp"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/comic_pic_state"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">            <span class="attr">android:layout_marginLeft</span>=<span class="string">"10dp"</span>  </div><div class="line">            <span class="attr">android:maxLines</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:textSize</span>=<span class="string">"12sp"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/time"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">            <span class="attr">android:layout_marginLeft</span>=<span class="string">"10dp"</span>  </div><div class="line">            <span class="attr">android:maxLines</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:textSize</span>=<span class="string">"12sp"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">            <span class="attr">android:text</span>=<span class="string">"@string/battery"</span>  </div><div class="line">            <span class="attr">android:layout_marginLeft</span>=<span class="string">"10dp"</span>  </div><div class="line">            <span class="attr">android:maxLines</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:textSize</span>=<span class="string">"12sp"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/battery"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:maxLines</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">            <span class="attr">android:layout_marginRight</span>=<span class="string">"20dp"</span>  </div><div class="line">            <span class="attr">android:textSize</span>=<span class="string">"12sp"</span>/&gt;  </div><div class="line">    <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"></div><div class="line">    <span class="comment">&lt;!--菜单按钮区域(实际作用区域)--&gt;</span>  </div><div class="line">    <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">        <span class="attr">android:id</span>=<span class="string">"@+id/menu_ctrl"</span>  </div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:orientation</span>=<span class="string">"vertical"</span>  </div><div class="line">        <span class="attr">android:visibility</span>=<span class="string">"visible"</span>&gt;  </div><div class="line">        <span class="comment">&lt;!--上一话--&gt;</span>  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/preHUAText"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"0dp"</span>  </div><div class="line">            <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>&gt;  </div><div class="line">        <span class="tag">&lt;/<span class="name">TextView</span>&gt;</span>  </div><div class="line">        <span class="comment">&lt;!--显示或者隐藏状态栏的触发器--&gt;</span>  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/toogle"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"0dp"</span>  </div><div class="line">            <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:layout_centerInParent</span>=<span class="string">"true"</span>&gt;<span class="tag">&lt;/<span class="name">TextView</span>&gt;</span>  </div><div class="line">        <span class="comment">&lt;!--下一话--&gt;</span>  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/nextHUAText"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"0dp"</span>  </div><div class="line">            <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>&gt;  </div><div class="line">        <span class="tag">&lt;/<span class="name">TextView</span>&gt;</span>  </div><div class="line">    <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line">    <span class="comment">&lt;!--菜单按钮效果效果区域--&gt;</span>  </div><div class="line">    <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">        <span class="attr">android:id</span>=<span class="string">"@+id/menu_content"</span>  </div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:orientation</span>=<span class="string">"vertical"</span>  </div><div class="line">        <span class="attr">android:visibility</span>=<span class="string">"gone"</span>&gt;  </div><div class="line">        <span class="comment">&lt;!--上一话--&gt;</span>  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"0dp"</span>  </div><div class="line">            <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:text</span>=<span class="string">"@string/preHUA"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorWrite"</span>  </div><div class="line">            <span class="attr">android:background</span>=<span class="string">"#50000000"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:textSize</span>=<span class="string">"30sp"</span>&gt;  </div><div class="line">        <span class="tag">&lt;/<span class="name">TextView</span>&gt;</span>  </div><div class="line">        <span class="comment">&lt;!--显示或者隐藏状态栏的触发器--&gt;</span>  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line"></div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"0dp"</span>  </div><div class="line">            <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:layout_centerInParent</span>=<span class="string">"true"</span>  </div><div class="line">            <span class="attr">android:background</span>=<span class="string">"#50000000"</span>  </div><div class="line">            <span class="attr">android:textSize</span>=<span class="string">"30sp"</span>  </div><div class="line">            <span class="attr">android:text</span>=<span class="string">"@string/menu"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorWrite"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:layout_marginTop</span>=<span class="string">"10dp"</span>  </div><div class="line">            <span class="attr">android:layout_marginBottom</span>=<span class="string">"10dp"</span>&gt;<span class="tag">&lt;/<span class="name">TextView</span>&gt;</span>  </div><div class="line">        <span class="comment">&lt;!--下一话--&gt;</span>  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"0dp"</span>  </div><div class="line">            <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:text</span>=<span class="string">"@string/nextHUA"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorWrite"</span>  </div><div class="line">            <span class="attr">android:background</span>=<span class="string">"#50000000"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:textSize</span>=<span class="string">"30sp"</span>&gt;  </div><div class="line">        <span class="tag">&lt;/<span class="name">TextView</span>&gt;</span>  </div><div class="line">    <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"></div><div class="line">    <span class="comment">&lt;!--顶部栏--&gt;</span>  </div><div class="line">    <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">        <span class="attr">android:id</span>=<span class="string">"@+id/top_layout"</span>  </div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"50dp"</span>  </div><div class="line">        <span class="attr">android:orientation</span>=<span class="string">"horizontal"</span>  </div><div class="line">        <span class="attr">android:background</span>=<span class="string">"#80000000"</span>  </div><div class="line">        <span class="attr">android:visibility</span>=<span class="string">"gone"</span>&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"0dp"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:orientation</span>=<span class="string">"horizontal"</span>&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">Button</span>  </span></div><div class="line">                <span class="attr">android:id</span>=<span class="string">"@+id/back_btn"</span>  </div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"10dp"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"20dp"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center_vertical"</span>  </div><div class="line">                <span class="attr">android:layout_marginLeft</span>=<span class="string">"15dp"</span>  </div><div class="line">                <span class="attr">android:background</span>=<span class="string">"@mipmap/arrow_left_better"</span>/&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">                <span class="attr">android:id</span>=<span class="string">"@+id/comic_name"</span>  </div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"30dp"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center_vertical"</span>  </div><div class="line">                <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:layout_marginLeft</span>=<span class="string">"10dp"</span>  </div><div class="line">                <span class="attr">android:textColor</span>=<span class="string">"@color/colorWrite"</span>/&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">                <span class="attr">android:id</span>=<span class="string">"@+id/comic_pic_state_top"</span>  </div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"30dp"</span>  </div><div class="line">                <span class="attr">android:layout_marginLeft</span>=<span class="string">"10dp"</span>  </div><div class="line">                <span class="attr">android:textColor</span>=<span class="string">"@color/colorWrite"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center_vertical"</span>  </div><div class="line">                <span class="attr">android:gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"></div><div class="line">        <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:orientation</span>=<span class="string">"horizontal"</span>  </div><div class="line">            <span class="attr">android:layout_marginLeft</span>=<span class="string">"10dp"</span>&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">Button</span>  </span></div><div class="line">                <span class="attr">android:id</span>=<span class="string">"@+id/show_menuBtn"</span>  </div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"20dp"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"20dp"</span>  </div><div class="line">                <span class="attr">android:background</span>=<span class="string">"@mipmap/info_72px"</span>  </div><div class="line">                <span class="attr">android:layout_marginRight</span>=<span class="string">"10dp"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center_vertical"</span>  </div><div class="line">                <span class="attr">android:layout_marginLeft</span>=<span class="string">"10dp"</span>/&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">Button</span>  </span></div><div class="line">                <span class="attr">android:id</span>=<span class="string">"@+id/feed_backBtn"</span>  </div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"20dp"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"20dp"</span>  </div><div class="line">                <span class="attr">android:background</span>=<span class="string">"@mipmap/edit_71"</span>  </div><div class="line">                <span class="attr">android:layout_marginRight</span>=<span class="string">"10dp"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center_vertical"</span>  </div><div class="line">                <span class="attr">android:layout_marginLeft</span>=<span class="string">"10dp"</span>/&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">Button</span>  </span></div><div class="line">                <span class="attr">android:id</span>=<span class="string">"@+id/downloadpic_Btn"</span>  </div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"20dp"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"20dp"</span>  </div><div class="line">                <span class="attr">android:background</span>=<span class="string">"@mipmap/download_46"</span>  </div><div class="line">                <span class="attr">android:layout_marginRight</span>=<span class="string">"10dp"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center_vertical"</span>  </div><div class="line">                <span class="attr">android:layout_marginLeft</span>=<span class="string">"10dp"</span>/&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">Button</span>  </span></div><div class="line">                <span class="attr">android:id</span>=<span class="string">"@+id/sharePicBtn"</span>  </div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"20dp"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"20dp"</span>  </div><div class="line">                <span class="attr">android:background</span>=<span class="string">"@mipmap/external_link_75"</span>  </div><div class="line">                <span class="attr">android:layout_marginRight</span>=<span class="string">"20dp"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center_vertical"</span>  </div><div class="line">                <span class="attr">android:layout_marginLeft</span>=<span class="string">"10dp"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line">    <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"></div><div class="line">    <span class="comment">&lt;!--SeekBar的操作提示栏,默认不可见，按下SeekBar可见，抬起不可见--&gt;</span>  </div><div class="line">    <span class="tag">&lt;<span class="name">RelativeLayout</span>  </span></div><div class="line">        <span class="attr">android:id</span>=<span class="string">"@+id/bottom_seekBar_help"</span>  </div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"30dp"</span>  </div><div class="line">        <span class="attr">android:layout_above</span>=<span class="string">"@+id/bottom_layout"</span>  </div><div class="line">        <span class="attr">android:layout_marginBottom</span>=<span class="string">"10dp"</span>  </div><div class="line">        <span class="attr">android:background</span>=<span class="string">"#80000000"</span>  </div><div class="line">        <span class="attr">android:visibility</span>=<span class="string">"gone"</span>&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:orientation</span>=<span class="string">"horizontal"</span>  </div><div class="line">            <span class="attr">android:layout_centerInParent</span>=<span class="string">"true"</span>&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">                <span class="attr">android:id</span>=<span class="string">"@+id/seekBar_help_now"</span>  </div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">                <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:textColor</span>=<span class="string">"@color/colorAqua"</span>/&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">                <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:text</span>=<span class="string">" / "</span>  </div><div class="line">                <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>/&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">                <span class="attr">android:id</span>=<span class="string">"@+id/seekBar_help_num"</span>  </div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"></div><div class="line">    <span class="tag">&lt;/<span class="name">RelativeLayout</span>&gt;</span>  </div><div class="line">    <span class="comment">&lt;!--底部栏--&gt;</span>  </div><div class="line"><span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">    <span class="attr">android:id</span>=<span class="string">"@+id/bottom_layout"</span>  </div><div class="line">    <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">    <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">    <span class="attr">android:orientation</span>=<span class="string">"vertical"</span>  </div><div class="line">    <span class="attr">android:layout_alignParentBottom</span>=<span class="string">"true"</span>  </div><div class="line">    <span class="attr">android:background</span>=<span class="string">"#80000000"</span>  </div><div class="line">    <span class="attr">android:visibility</span>=<span class="string">"gone"</span>&gt;  </div><div class="line">    <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"50dp"</span>  </div><div class="line">        <span class="attr">android:orientation</span>=<span class="string">"horizontal"</span>  </div><div class="line">        <span class="attr">android:layout_marginBottom</span>=<span class="string">"10dp"</span>  </div><div class="line">        <span class="attr">android:layout_marginLeft</span>=<span class="string">"15dp"</span>  </div><div class="line">        <span class="attr">android:layout_marginRight</span>=<span class="string">"15dp"</span>  </div><div class="line">        <span class="attr">android:layout_marginTop</span>=<span class="string">"10dp"</span>&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/preHUA"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:text</span>=<span class="string">"@string/preHUA"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">SeekBar</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/bottom_seekBar"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"0dp"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_marginLeft</span>=<span class="string">"10dp"</span>  </div><div class="line">            <span class="attr">android:layout_marginRight</span>=<span class="string">"10dp"</span>  </div><div class="line">            <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/nextHUA"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">            <span class="attr">android:text</span>=<span class="string">"@string/nextHUA"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line">    <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"><span class="comment">&lt;!--底部菜单栏--&gt;</span>  </div><div class="line">    <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">        <span class="attr">android:layout_marginTop</span>=<span class="string">"10dp"</span>        <span class="attr">android:layout_marginBottom</span>=<span class="string">"10dp"</span>  </div><div class="line">        <span class="attr">android:orientation</span>=<span class="string">"horizontal"</span>  </div><div class="line">        <span class="attr">android:layout_marginLeft</span>=<span class="string">"20dp"</span>  </div><div class="line">        <span class="attr">android:layout_marginRight</span>=<span class="string">"20dp"</span>&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">        <span class="attr">android:id</span>=<span class="string">"@+id/indexBtn"</span>  </div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"0dp"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">        <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">        <span class="attr">android:orientation</span>=<span class="string">"vertical"</span>&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">ImageView</span>  </span></div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"30dp"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"30dp"</span>  </div><div class="line">            <span class="attr">android:src</span>=<span class="string">"@mipmap/menu_expanded_109"</span>  </div><div class="line">            <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">            <span class="attr">android:text</span>=<span class="string">"@string/index"</span>/&gt;  </div><div class="line">    <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"></div><div class="line">        <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/download_comic_Btn"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"0dp"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:orientation</span>=<span class="string">"vertical"</span>&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">ImageView</span>  </span></div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"30dp"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"30dp"</span>  </div><div class="line">                <span class="attr">android:src</span>=<span class="string">"@mipmap/downloadbtn"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">                <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">                <span class="attr">android:text</span>=<span class="string">"@string/download"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"></div><div class="line">        <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">        <span class="attr">android:id</span>=<span class="string">"@+id/light_btn"</span>  </div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"0dp"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">        <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">        <span class="attr">android:orientation</span>=<span class="string">"vertical"</span>&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">ImageView</span>  </span></div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"30dp"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"30dp"</span>  </div><div class="line">            <span class="attr">android:src</span>=<span class="string">"@mipmap/light_bulb_46"</span>  </div><div class="line">            <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>  </div><div class="line">            <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">            <span class="attr">android:text</span>=<span class="string">"@string/light"</span>/&gt;  </div><div class="line">    <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"></div><div class="line">        <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/phone_switch"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"0dp"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:orientation</span>=<span class="string">"vertical"</span>&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">ImageView</span>  </span></div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"30dp"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"30dp"</span>  </div><div class="line">                <span class="attr">android:src</span>=<span class="string">"@mipmap/phonestatus_switch"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">                <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">                <span class="attr">android:text</span>=<span class="string">"@string/landscape"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"></div><div class="line">        <span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">            <span class="attr">android:id</span>=<span class="string">"@+id/options_btn"</span>  </div><div class="line">            <span class="attr">android:layout_width</span>=<span class="string">"0dp"</span>  </div><div class="line">            <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">            <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">            <span class="attr">android:orientation</span>=<span class="string">"vertical"</span>&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">ImageView</span>  </span></div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"30dp"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"30dp"</span>  </div><div class="line">                <span class="attr">android:src</span>=<span class="string">"@mipmap/options_72"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line">            <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">                <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span>  </div><div class="line">                <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span>  </div><div class="line">                <span class="attr">android:gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>  </div><div class="line">                <span class="attr">android:textColor</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">                <span class="attr">android:text</span>=<span class="string">"@string/options"</span>/&gt;  </div><div class="line">        <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line">    <span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"><span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"><span class="tag">&lt;/<span class="name">RelativeLayout</span>&gt;</span></div></pre></td></tr></table></figure>
<h4 id="RecyclerView-item布局："><a href="#RecyclerView-item布局：" class="headerlink" title="RecyclerView item布局："></a>RecyclerView item布局：</h4><figure class="highlight xml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div></pre></td><td class="code"><pre><div class="line">&lt;?xml version="1.0" encoding="utf-8"?&gt;  </div><div class="line"><span class="tag">&lt;<span class="name">LinearLayout</span> <span class="attr">xmlns:android</span>=<span class="string">"http://schemas.android.com/apk/res/android"</span>  </span></div><div class="line">              <span class="attr">android:orientation</span>=<span class="string">"vertical"</span>  </div><div class="line">              <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">              <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>&gt;  </div><div class="line"><span class="tag">&lt;<span class="name">RelativeLayout</span>  </span></div><div class="line">    <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">    <span class="attr">android:layout_weight</span>=<span class="string">"1"</span>  </div><div class="line">    <span class="attr">android:layout_height</span>=<span class="string">"0dp"</span>&gt;  </div><div class="line">    <span class="comment">&lt;!--做出占位的字，图片加载出来后会被图片覆盖--&gt;</span>  </div><div class="line">    <span class="tag">&lt;<span class="name">TextView</span>  </span></div><div class="line">        <span class="attr">android:id</span>=<span class="string">"@+id/textView"</span>  </div><div class="line">        <span class="attr">android:background</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:textColor</span>=<span class="string">"@color/colorDimGray"</span>  </div><div class="line">        <span class="attr">android:text</span>=<span class="string">"1"</span>  </div><div class="line">        <span class="attr">android:textSize</span>=<span class="string">"80sp"</span>  </div><div class="line">        <span class="attr">android:gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line">    <span class="tag">&lt;<span class="name">ImageView</span>  </span></div><div class="line">        <span class="attr">android:id</span>=<span class="string">"@+id/imageView"</span>  </div><div class="line">        <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:layout_height</span>=<span class="string">"match_parent"</span>  </div><div class="line">        <span class="attr">android:scaleType</span>=<span class="string">"fitXY"</span>  </div><div class="line">        <span class="attr">android:layout_gravity</span>=<span class="string">"center"</span>/&gt;  </div><div class="line"><span class="tag">&lt;/<span class="name">RelativeLayout</span>&gt;</span>  </div><div class="line"><span class="comment">&lt;!--分隔线，让布局看起来更清晰，可以去掉--&gt;</span>  </div><div class="line"><span class="tag">&lt;<span class="name">LinearLayout</span>  </span></div><div class="line">    <span class="attr">android:layout_width</span>=<span class="string">"match_parent"</span>  </div><div class="line">    <span class="attr">android:layout_height</span>=<span class="string">"3dp"</span>  </div><div class="line">    <span class="attr">android:background</span>=<span class="string">"@color/colorSliteGray"</span>  </div><div class="line">    <span class="attr">android:layout_alignParentBottom</span>=<span class="string">"true"</span>&gt;<span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span>  </div><div class="line"><span class="tag">&lt;/<span class="name">LinearLayout</span>&gt;</span></div></pre></td></tr></table></figure>
<h4 id="Java代码"><a href="#Java代码" class="headerlink" title="Java代码"></a>Java代码</h4><figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div><div class="line">115</div><div class="line">116</div><div class="line">117</div><div class="line">118</div><div class="line">119</div><div class="line">120</div><div class="line">121</div><div class="line">122</div><div class="line">123</div><div class="line">124</div><div class="line">125</div><div class="line">126</div><div class="line">127</div><div class="line">128</div><div class="line">129</div><div class="line">130</div><div class="line">131</div><div class="line">132</div><div class="line">133</div><div class="line">134</div><div class="line">135</div><div class="line">136</div><div class="line">137</div><div class="line">138</div><div class="line">139</div><div class="line">140</div><div class="line">141</div><div class="line">142</div><div class="line">143</div><div class="line">144</div><div class="line">145</div><div class="line">146</div><div class="line">147</div><div class="line">148</div><div class="line">149</div><div class="line">150</div><div class="line">151</div><div class="line">152</div><div class="line">153</div><div class="line">154</div><div class="line">155</div><div class="line">156</div><div class="line">157</div><div class="line">158</div><div class="line">159</div><div class="line">160</div><div class="line">161</div><div class="line">162</div><div class="line">163</div><div class="line">164</div><div class="line">165</div><div class="line">166</div><div class="line">167</div><div class="line">168</div><div class="line">169</div><div class="line">170</div><div class="line">171</div><div class="line">172</div><div class="line">173</div><div class="line">174</div><div class="line">175</div><div class="line">176</div><div class="line">177</div><div class="line">178</div><div class="line">179</div><div class="line">180</div><div class="line">181</div><div class="line">182</div><div class="line">183</div><div class="line">184</div><div class="line">185</div><div class="line">186</div><div class="line">187</div><div class="line">188</div><div class="line">189</div><div class="line">190</div><div class="line">191</div><div class="line">192</div><div class="line">193</div><div class="line">194</div><div class="line">195</div><div class="line">196</div><div class="line">197</div><div class="line">198</div><div class="line">199</div><div class="line">200</div><div class="line">201</div><div class="line">202</div><div class="line">203</div><div class="line">204</div><div class="line">205</div><div class="line">206</div><div class="line">207</div><div class="line">208</div><div class="line">209</div><div class="line">210</div><div class="line">211</div><div class="line">212</div><div class="line">213</div><div class="line">214</div><div class="line">215</div><div class="line">216</div><div class="line">217</div><div class="line">218</div><div class="line">219</div><div class="line">220</div><div class="line">221</div><div class="line">222</div><div class="line">223</div><div class="line">224</div><div class="line">225</div><div class="line">226</div><div class="line">227</div><div class="line">228</div><div class="line">229</div><div class="line">230</div><div class="line">231</div><div class="line">232</div><div class="line">233</div><div class="line">234</div><div class="line">235</div><div class="line">236</div><div class="line">237</div><div class="line">238</div><div class="line">239</div><div class="line">240</div><div class="line">241</div><div class="line">242</div><div class="line">243</div><div class="line">244</div><div class="line">245</div><div class="line">246</div><div class="line">247</div><div class="line">248</div><div class="line">249</div><div class="line">250</div><div class="line">251</div><div class="line">252</div><div class="line">253</div><div class="line">254</div><div class="line">255</div><div class="line">256</div><div class="line">257</div><div class="line">258</div><div class="line">259</div><div class="line">260</div><div class="line">261</div><div class="line">262</div><div class="line">263</div><div class="line">264</div><div class="line">265</div><div class="line">266</div><div class="line">267</div><div class="line">268</div><div class="line">269</div><div class="line">270</div><div class="line">271</div><div class="line">272</div><div class="line">273</div><div class="line">274</div><div class="line">275</div><div class="line">276</div><div class="line">277</div><div class="line">278</div><div class="line">279</div><div class="line">280</div><div class="line">281</div><div class="line">282</div><div class="line">283</div><div class="line">284</div><div class="line">285</div><div class="line">286</div><div class="line">287</div><div class="line">288</div><div class="line">289</div><div class="line">290</div><div class="line">291</div><div class="line">292</div><div class="line">293</div><div class="line">294</div><div class="line">295</div><div class="line">296</div><div class="line">297</div><div class="line">298</div><div class="line">299</div><div class="line">300</div><div class="line">301</div><div class="line">302</div><div class="line">303</div><div class="line">304</div><div class="line">305</div><div class="line">306</div><div class="line">307</div><div class="line">308</div><div class="line">309</div><div class="line">310</div><div class="line">311</div><div class="line">312</div><div class="line">313</div><div class="line">314</div><div class="line">315</div><div class="line">316</div><div class="line">317</div><div class="line">318</div><div class="line">319</div><div class="line">320</div><div class="line">321</div><div class="line">322</div><div class="line">323</div><div class="line">324</div><div class="line">325</div><div class="line">326</div><div class="line">327</div><div class="line">328</div><div class="line">329</div><div class="line">330</div><div class="line">331</div><div class="line">332</div><div class="line">333</div><div class="line">334</div><div class="line">335</div><div class="line">336</div><div class="line">337</div><div class="line">338</div><div class="line">339</div><div class="line">340</div><div class="line">341</div><div class="line">342</div><div class="line">343</div><div class="line">344</div><div class="line">345</div><div class="line">346</div><div class="line">347</div><div class="line">348</div><div class="line">349</div><div class="line">350</div><div class="line">351</div><div class="line">352</div><div class="line">353</div><div class="line">354</div><div class="line">355</div><div class="line">356</div><div class="line">357</div><div class="line">358</div><div class="line">359</div><div class="line">360</div><div class="line">361</div><div class="line">362</div><div class="line">363</div><div class="line">364</div><div class="line">365</div><div class="line">366</div><div class="line">367</div><div class="line">368</div><div class="line">369</div><div class="line">370</div><div class="line">371</div><div class="line">372</div><div class="line">373</div><div class="line">374</div><div class="line">375</div><div class="line">376</div><div class="line">377</div><div class="line">378</div><div class="line">379</div><div class="line">380</div><div class="line">381</div><div class="line">382</div><div class="line">383</div><div class="line">384</div><div class="line">385</div><div class="line">386</div><div class="line">387</div><div class="line">388</div><div class="line">389</div><div class="line">390</div><div class="line">391</div><div class="line">392</div><div class="line">393</div><div class="line">394</div><div class="line">395</div><div class="line">396</div><div class="line">397</div><div class="line">398</div><div class="line">399</div><div class="line">400</div><div class="line">401</div><div class="line">402</div><div class="line">403</div><div class="line">404</div><div class="line">405</div><div class="line">406</div><div class="line">407</div><div class="line">408</div><div class="line">409</div><div class="line">410</div><div class="line">411</div><div class="line">412</div><div class="line">413</div><div class="line">414</div><div class="line">415</div><div class="line">416</div><div class="line">417</div><div class="line">418</div><div class="line">419</div><div class="line">420</div><div class="line">421</div><div class="line">422</div><div class="line">423</div><div class="line">424</div><div class="line">425</div><div class="line">426</div><div class="line">427</div><div class="line">428</div><div class="line">429</div><div class="line">430</div><div class="line">431</div><div class="line">432</div><div class="line">433</div><div class="line">434</div><div class="line">435</div><div class="line">436</div><div class="line">437</div><div class="line">438</div><div class="line">439</div><div class="line">440</div><div class="line">441</div><div class="line">442</div><div class="line">443</div><div class="line">444</div><div class="line">445</div><div class="line">446</div><div class="line">447</div><div class="line">448</div><div class="line">449</div><div class="line">450</div><div class="line">451</div><div class="line">452</div><div class="line">453</div><div class="line">454</div><div class="line">455</div><div class="line">456</div><div class="line">457</div><div class="line">458</div><div class="line">459</div><div class="line">460</div><div class="line">461</div><div class="line">462</div><div class="line">463</div><div class="line">464</div><div class="line">465</div><div class="line">466</div><div class="line">467</div><div class="line">468</div><div class="line">469</div><div class="line">470</div><div class="line">471</div><div class="line">472</div><div class="line">473</div><div class="line">474</div><div class="line">475</div><div class="line">476</div><div class="line">477</div><div class="line">478</div><div class="line">479</div><div class="line">480</div><div class="line">481</div><div class="line">482</div><div class="line">483</div><div class="line">484</div><div class="line">485</div><div class="line">486</div><div class="line">487</div><div class="line">488</div><div class="line">489</div><div class="line">490</div><div class="line">491</div><div class="line">492</div><div class="line">493</div><div class="line">494</div><div class="line">495</div><div class="line">496</div><div class="line">497</div><div class="line">498</div><div class="line">499</div><div class="line">500</div><div class="line">501</div><div class="line">502</div><div class="line">503</div><div class="line">504</div><div class="line">505</div><div class="line">506</div><div class="line">507</div><div class="line">508</div><div class="line">509</div><div class="line">510</div><div class="line">511</div><div class="line">512</div><div class="line">513</div><div class="line">514</div><div class="line">515</div><div class="line">516</div><div class="line">517</div><div class="line">518</div><div class="line">519</div><div class="line">520</div><div class="line">521</div><div class="line">522</div><div class="line">523</div><div class="line">524</div><div class="line">525</div><div class="line">526</div><div class="line">527</div><div class="line">528</div><div class="line">529</div><div class="line">530</div><div class="line">531</div><div class="line">532</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">package</span> winter.zxb.smilesb101.cartoon8;  </div><div class="line"></div><div class="line"><span class="keyword">import</span> android.annotation.SuppressLint;  </div><div class="line"><span class="keyword">import</span> android.app.Activity;  </div><div class="line"><span class="keyword">import</span> android.content.BroadcastReceiver;  </div><div class="line"><span class="keyword">import</span> android.content.Context;  </div><div class="line"><span class="keyword">import</span> android.content.Intent;  </div><div class="line"><span class="keyword">import</span> android.content.IntentFilter;  </div><div class="line"><span class="keyword">import</span> android.media.Image;  </div><div class="line"><span class="keyword">import</span> android.os.AsyncTask;  </div><div class="line"><span class="keyword">import</span> android.os.BatteryManager;  </div><div class="line"><span class="keyword">import</span> android.os.Message;  </div><div class="line"><span class="keyword">import</span> android.support.annotation.Nullable;  </div><div class="line"><span class="keyword">import</span> android.support.v4.app.Fragment;  </div><div class="line"><span class="keyword">import</span> android.support.v4.app.FragmentManager;  </div><div class="line"><span class="keyword">import</span> android.support.v4.app.FragmentPagerAdapter;  </div><div class="line"><span class="keyword">import</span> android.support.v7.app.ActionBar;  </div><div class="line"><span class="keyword">import</span> android.support.v7.app.AppCompatActivity;  </div><div class="line"><span class="keyword">import</span> android.os.Bundle;  </div><div class="line"><span class="keyword">import</span> android.os.Handler;  </div><div class="line"><span class="keyword">import</span> android.support.v7.widget.LinearLayoutManager;  </div><div class="line"><span class="keyword">import</span> android.support.v7.widget.RecyclerView;  </div><div class="line"><span class="keyword">import</span> android.util.Log;  </div><div class="line"><span class="keyword">import</span> android.view.LayoutInflater;  </div><div class="line"><span class="keyword">import</span> android.view.MotionEvent;  </div><div class="line"><span class="keyword">import</span> android.view.View;  </div><div class="line"><span class="keyword">import</span> android.view.ViewGroup;  </div><div class="line"><span class="keyword">import</span> android.view.WindowManager;  </div><div class="line"><span class="keyword">import</span> android.view.animation.Animation;  </div><div class="line"><span class="keyword">import</span> android.view.animation.TranslateAnimation;  </div><div class="line"><span class="keyword">import</span> android.widget.Button;  </div><div class="line"><span class="keyword">import</span> android.widget.ImageSwitcher;  </div><div class="line"><span class="keyword">import</span> android.widget.ImageView;  </div><div class="line"><span class="keyword">import</span> android.widget.LinearLayout;  </div><div class="line"><span class="keyword">import</span> android.widget.RelativeLayout;  </div><div class="line"><span class="keyword">import</span> android.widget.SeekBar;  </div><div class="line"><span class="keyword">import</span> android.widget.TextView;  </div><div class="line"><span class="keyword">import</span> android.widget.Toast;  </div><div class="line"></div><div class="line"><span class="keyword">import</span> com.bumptech.glide.Glide;  </div><div class="line"></div><div class="line"><span class="keyword">import</span> java.util.ArrayList;  </div><div class="line"></div><div class="line"><span class="keyword">import</span> ComicData.Comic;  </div><div class="line"><span class="keyword">import</span> RetailsWorm.HtmlAnalysisUtils;  </div><div class="line"><span class="keyword">import</span> RetailsWorm.NetWorkUtils;  </div><div class="line"><span class="keyword">import</span> Utils.Utils;  </div><div class="line"></div><div class="line"><span class="keyword">import</span> <span class="keyword">static</span> ComicData.comicStaticValue.COMIC_PICS;  </div><div class="line"><span class="keyword">import</span> <span class="keyword">static</span> ComicData.comicStaticValue.COMIC_PIC_DOM;  </div><div class="line"></div><div class="line"><span class="comment">/**</span></div><div class="line"> * An example full-screen activity that shows and hides the system UI (i.e.</div><div class="line"> * status bar and navigation/system bar) with user interaction.</div><div class="line"> */  </div><div class="line"><span class="keyword">public</span> <span class="keyword">final</span> <span class="class"><span class="keyword">class</span> <span class="title">WatchComicActivity</span> <span class="keyword">extends</span> <span class="title">AppCompatActivity</span> <span class="keyword">implements</span> <span class="title">View</span>.<span class="title">OnClickListener</span></span>&#123;  </div><div class="line">    <span class="comment">/**</span></div><div class="line">     * Whether or not the system UI should be auto-hidden after</div><div class="line">     * &#123;<span class="doctag">@link</span> #AUTO_HIDE_DELAY_MILLIS&#125; milliseconds.</div><div class="line">     */  </div><div class="line">    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">boolean</span> AUTO_HIDE = <span class="keyword">true</span>;  </div><div class="line"></div><div class="line">    <span class="comment">/**</span></div><div class="line">     * If &#123;<span class="doctag">@link</span> #AUTO_HIDE&#125; is set, the number of milliseconds to wait after</div><div class="line">     * user interaction before hiding the system UI.</div><div class="line">     */  </div><div class="line">    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> AUTO_HIDE_DELAY_MILLIS = <span class="number">1000</span>;  </div><div class="line"></div><div class="line">    <span class="comment">/**</span></div><div class="line">     * 动画时间</div><div class="line">     */  </div><div class="line">    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> UI_ANIMATION_DELAY = <span class="number">200</span>;  </div><div class="line">    <span class="keyword">private</span> <span class="keyword">final</span> Handler mHideHandler = <span class="keyword">new</span> Handler();  </div><div class="line">    <span class="keyword">private</span> RecyclerView mContentView;  </div><div class="line">    <span class="keyword">private</span> View mControlsView;  </div><div class="line">    <span class="keyword">private</span> MyContentViewAdapter adapter;  </div><div class="line">    <span class="keyword">private</span> <span class="keyword">int</span> adapterNowPos,allItems;  </div><div class="line">    <span class="keyword">private</span> <span class="keyword">final</span> Runnable mShowPart2Runnable = <span class="keyword">new</span> Runnable()&#123;  </div><div class="line">        <span class="meta">@Override</span>  </div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">run</span><span class="params">()</span></span>&#123;  </div><div class="line">            <span class="comment">// Delayed display of UI elements  </span></div><div class="line">            ActionBar actionBar = getSupportActionBar();  </div><div class="line">            <span class="keyword">if</span>(actionBar != <span class="keyword">null</span>) &#123;  </div><div class="line">                actionBar.show();  </div><div class="line">            &#125;  </div><div class="line">        &#125;  </div><div class="line">    &#125;;  </div><div class="line">    <span class="comment">/**</span></div><div class="line">     * 显示或者隐藏状态</div><div class="line">     */  </div><div class="line">    <span class="keyword">private</span> <span class="keyword">boolean</span> mVisible;  </div><div class="line">    Handler handler = <span class="keyword">new</span> Handler()&#123;  </div><div class="line">        <span class="meta">@Override</span>  </div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">handleMessage</span><span class="params">(Message msg)</span></span>&#123;  </div><div class="line">            <span class="keyword">switch</span>(msg.what) &#123;  </div><div class="line">                <span class="keyword">case</span> NetWorkUtils.MSG_HTML:  </div><div class="line">                    String html = msg.obj.toString();  </div><div class="line">                    <span class="keyword">if</span>(!html.equals(NetWorkUtils.HTML_EMPTY)) &#123;  </div><div class="line">                        InitLayoutValue(html);  </div><div class="line">                    &#125;  </div><div class="line">                    <span class="keyword">else</span>  </div><div class="line">                    &#123;  </div><div class="line">                        Log.i(TAG,<span class="string">"handleMessage: 网络错误！！"</span>);  </div><div class="line">                    &#125;  </div><div class="line">                    <span class="keyword">break</span>;  </div><div class="line">            &#125;  </div><div class="line">        &#125;  </div><div class="line">    &#125;;  </div><div class="line"></div><div class="line">    <span class="comment">/**</span></div><div class="line">     * 处理网页</div><div class="line">     * <span class="doctag">@param</span> html</div><div class="line">     */  </div><div class="line">    <span class="function"><span class="keyword">void</span> <span class="title">InitLayoutValue</span><span class="params">(<span class="keyword">final</span> String html)</span>  </span></div><div class="line">    &#123;  </div><div class="line">        <span class="keyword">new</span> AsyncTask&lt;String,Void,Void&gt;()&#123;  </div><div class="line">            <span class="meta">@Override</span>  </div><div class="line">            <span class="function"><span class="keyword">protected</span> Void <span class="title">doInBackground</span><span class="params">(String... params)</span></span>&#123;  </div><div class="line">                Log.i(TAG,<span class="string">"doInBackground: 后台操作获取图片"</span>);  </div><div class="line">                comic = <span class="keyword">new</span> Comic();  </div><div class="line">                comic_Pics = HtmlAnalysisUtils.getComicPicsString(params[<span class="number">0</span>],COMIC_PICS,<span class="number">5</span>);<span class="comment">//第5个位置是图片位置  </span></div><div class="line">                comic.setName(HtmlAnalysisUtils.getComicDetails(params[<span class="number">0</span>],COMIC_PIC_DOM.get(<span class="number">2</span>),HtmlAnalysisUtils.WHAT_innerHTML).get(<span class="number">0</span>));  </div><div class="line">                comic_hua = HtmlAnalysisUtils.getComicDetails(params[<span class="number">0</span>],COMIC_PIC_DOM.get(<span class="number">1</span>),HtmlAnalysisUtils.WHAT_innerHTML).get(<span class="number">0</span>).replace(comic.getName(),<span class="string">""</span>);<span class="comment">//去掉多余的名称  </span></div><div class="line">                <span class="keyword">return</span> <span class="keyword">null</span>;  </div><div class="line">            &#125;  </div><div class="line"></div><div class="line">            <span class="meta">@Override</span>  </div><div class="line">            <span class="function"><span class="keyword">protected</span> <span class="keyword">void</span> <span class="title">onPostExecute</span><span class="params">(Void aVoid)</span></span>&#123;  </div><div class="line">                <span class="keyword">super</span>.onPostExecute(aVoid);  </div><div class="line">                <span class="comment">//Log.i(TAG,"onPostExecute: 获取图片完成");  </span></div><div class="line">                comic_name_bottom.setText(comic_hua);  </div><div class="line">                comic_name_top.setText(comic_hua);  </div><div class="line">                <span class="keyword">if</span>(comic_Pics!=<span class="keyword">null</span>)  </div><div class="line">                &#123;  </div><div class="line">                    Log.i(TAG,<span class="string">"onPostExecute: "</span>+comic_Pics.get(<span class="number">1</span>));  </div><div class="line">                    <span class="comment">//实例化adapter  </span></div><div class="line">                    mContentView.setLayoutManager(<span class="keyword">new</span> LinearLayoutManager(activity));  </div><div class="line">                    adapter = <span class="keyword">new</span> MyContentViewAdapter(comic_Pics);  </div><div class="line">                    mContentView.setAdapter(adapter);  </div><div class="line">                    mContentView.setOnScrollListener(scrollListener);  </div><div class="line">                &#125;  </div><div class="line">            &#125;  </div><div class="line">        &#125;.execute(html);  </div><div class="line">    &#125;  </div><div class="line">    <span class="keyword">private</span> RecyclerView.OnScrollListener scrollListener = <span class="keyword">new</span> RecyclerView.OnScrollListener()&#123;  </div><div class="line">        <span class="meta">@Override</span>  </div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">onScrolled</span><span class="params">(RecyclerView recyclerView,<span class="keyword">int</span> dx,<span class="keyword">int</span> dy)</span></span>&#123;  </div><div class="line">            <span class="keyword">super</span>.onScrolled(recyclerView,dx,dy);  </div><div class="line">            LinearLayoutManager l = (LinearLayoutManager)recyclerView.getLayoutManager();  </div><div class="line">            adapterNowPos = l.findFirstVisibleItemPosition();  </div><div class="line">            allItems = l.getItemCount();  </div><div class="line">            <span class="comment">//设置seekbar  </span></div><div class="line">            seekBar.setMax(allItems-<span class="number">1</span>);  </div><div class="line">            Log.i(TAG,<span class="string">"onScrolled: "</span>+allItems);  </div><div class="line">            seekBar.setProgress(adapterNowPos);  </div><div class="line">            setpicText();<span class="comment">//设置文字  </span></div><div class="line">        &#125;  </div><div class="line">    &#125;;  </div><div class="line">    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> String TAG = <span class="string">"WatchComicActivity"</span>;  </div><div class="line">    <span class="comment">/**</span></div><div class="line">     * 漫画的VALUE</div><div class="line">     */  </div><div class="line">    <span class="keyword">public</span> <span class="keyword">static</span> String COMIC_VALUE = <span class="string">"COMIC"</span>;  </div><div class="line">    <span class="keyword">public</span> <span class="keyword">static</span> String COMIC_LINK = <span class="string">"CMOIC_LINK"</span>;  </div><div class="line">    <span class="keyword">public</span> <span class="keyword">static</span> String COMIC_HUA = <span class="string">"HUA"</span>;  </div><div class="line">    <span class="keyword">public</span> <span class="keyword">static</span> String COMIC_NAME = <span class="string">"NAME"</span>;  </div><div class="line">    <span class="keyword">private</span> Comic comic;  </div><div class="line">    <span class="keyword">private</span> String comic_link;  </div><div class="line">    <span class="keyword">private</span> String comic_hua;  </div><div class="line">    <span class="keyword">private</span> ArrayList&lt;String&gt; comic_Pics;  </div><div class="line">    <span class="keyword">private</span> Activity activity;  </div><div class="line">    <span class="keyword">private</span> LinearLayout toplayout;  </div><div class="line">    <span class="keyword">private</span> Button showCtrlbtn,backBtn,feedbackBtn,downLoadPicBtn,sharePicBtn;  </div><div class="line">    <span class="keyword">private</span> LinearLayout bottomlayout;  </div><div class="line">    <span class="keyword">private</span> TextView nextToogle,toogleBtn,preToogle;  </div><div class="line">    <span class="keyword">private</span> LinearLayout menu_content;  </div><div class="line">    <span class="keyword">private</span> TextView comic_name_bottom,comic_pic_state,time,battery;  </div><div class="line">    <span class="keyword">private</span> SeekBar seekBar;  </div><div class="line">    <span class="keyword">private</span> LinearLayout small_status;  </div><div class="line">    <span class="keyword">private</span> RelativeLayout bottom_seekBar_help;  </div><div class="line"></div><div class="line">    <span class="keyword">private</span> TextView seekBar_help_now,seekBar_help_num;  </div><div class="line"></div><div class="line">    <span class="keyword">private</span> Button backbtn;  </div><div class="line">    <span class="keyword">private</span> TextView comic_name_top,pic_state_top;  </div><div class="line"></div><div class="line">    <span class="keyword">private</span> LinearLayout indexBtn,download_comic_Btn,light_btn,phone_switch,options_btn;  </div><div class="line">    <span class="meta">@Override</span>  </div><div class="line">    <span class="function"><span class="keyword">protected</span> <span class="keyword">void</span> <span class="title">onCreate</span><span class="params">(Bundle savedInstanceState)</span></span>&#123;  </div><div class="line">        <span class="keyword">super</span>.onCreate(savedInstanceState);  </div><div class="line">        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,  </div><div class="line">                WindowManager.LayoutParams.FLAG_FULLSCREEN);  </div><div class="line"></div><div class="line">        setContentView(R.layout.activity_watch_comic);  </div><div class="line"></div><div class="line">        <span class="comment">//注册电量监听广播  </span></div><div class="line">        registerReceiver(batterReceiver,<span class="keyword">new</span> IntentFilter(Intent.ACTION_BATTERY_CHANGED));  </div><div class="line"></div><div class="line">        mVisible = <span class="keyword">false</span>;<span class="comment">//一开始是不可见状态  </span></div><div class="line">        mContentView = (RecyclerView)findViewById(R.id.fullscreen_content);  </div><div class="line">        toplayout = (LinearLayout)findViewById(R.id.top_layout);  </div><div class="line">        bottomlayout = (LinearLayout)findViewById(R.id.bottom_layout);  </div><div class="line">        toogleBtn = (TextView)findViewById(R.id.toogle);  </div><div class="line">        nextToogle = (TextView)findViewById(R.id.nextHUAText);  </div><div class="line">        preToogle = (TextView)findViewById(R.id.preHUAText);  </div><div class="line">        menu_content = (LinearLayout)findViewById(R.id.menu_content);  </div><div class="line">        showCtrlbtn = (Button)findViewById(R.id.show_menuBtn);  </div><div class="line">        backBtn = (Button)findViewById(R.id.back_btn);  </div><div class="line">        feedbackBtn = (Button)findViewById(R.id.feed_backBtn);  </div><div class="line">        downLoadPicBtn = (Button)findViewById(R.id.downloadpic_Btn);  </div><div class="line">        sharePicBtn = (Button)findViewById(R.id.sharePicBtn);  </div><div class="line">        bottom_seekBar_help = (RelativeLayout)findViewById(R.id.bottom_seekBar_help);  </div><div class="line">        seekBar_help_now = (TextView)findViewById(R.id.seekBar_help_now);  </div><div class="line">        seekBar_help_num = (TextView)findViewById(R.id.seekBar_help_num);  </div><div class="line"></div><div class="line">        menu_content.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        showCtrlbtn.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        backBtn.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        feedbackBtn.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        downLoadPicBtn.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        sharePicBtn.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line"></div><div class="line">        comic_name_bottom = (TextView)findViewById(R.id.comic_name_bottom);  </div><div class="line">        comic_pic_state = (TextView)findViewById(R.id.comic_pic_state);  </div><div class="line">        time = (TextView)findViewById(R.id.time);  </div><div class="line">        battery = (TextView)findViewById(R.id.battery);  </div><div class="line">        time.setText(Utils.getTimeHour());  </div><div class="line">        small_status = (LinearLayout)findViewById(R.id.small_status);  </div><div class="line">        seekBar = (SeekBar)findViewById(R.id.bottom_seekBar);  </div><div class="line">        seekBar.setOnSeekBarChangeListener(seekChangerListener);  </div><div class="line">        <span class="comment">//Log.i(TAG,"onCreate: "+Utils.getPhoneBatteryInfo(this,BatteryManager.BATTERY_PROPERTY_CURRENT_NOW,Utils.DATATYPE_INT));  </span></div><div class="line"></div><div class="line">        toogleBtn.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        nextToogle.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        preToogle.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        toogleBtn.setOnTouchListener(ctrl_touchlistenner);  </div><div class="line">        nextToogle.setOnTouchListener(ctrl_touchlistenner);  </div><div class="line">        preToogle.setOnTouchListener(ctrl_touchlistenner);  </div><div class="line"></div><div class="line">        comic_name_top = (TextView)findViewById(R.id.comic_name);  </div><div class="line">        pic_state_top = (TextView)findViewById(R.id.comic_pic_state_top);  </div><div class="line"></div><div class="line">        <span class="comment">//底边菜单  </span></div><div class="line">        indexBtn = (LinearLayout)findViewById(R.id.indexBtn);  </div><div class="line">        download_comic_Btn = (LinearLayout)findViewById(R.id.download_comic_Btn);  </div><div class="line">        light_btn = (LinearLayout)findViewById(R.id.light_btn);  </div><div class="line">        phone_switch = (LinearLayout)findViewById(R.id.phone_switch);  </div><div class="line">        options_btn  = (LinearLayout)findViewById(R.id.options_btn);  </div><div class="line"></div><div class="line">        indexBtn.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        download_comic_Btn.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        light_btn.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        phone_switch.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        indexBtn.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line">        options_btn.setOnClickListener(<span class="keyword">this</span>);  </div><div class="line"></div><div class="line">        activity = <span class="keyword">this</span>;  </div><div class="line">        <span class="keyword">if</span>(getIntent()!=<span class="keyword">null</span>)  </div><div class="line">        &#123;  </div><div class="line">            Intent intent = getIntent();  </div><div class="line">            comic = (Comic)intent.getSerializableExtra(COMIC_VALUE);  </div><div class="line">            comic_link = intent.getStringExtra(COMIC_LINK);  </div><div class="line">            <span class="keyword">new</span> Runnable()&#123;  </div><div class="line">                <span class="meta">@Override</span>  </div><div class="line">                <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">run</span><span class="params">()</span></span>&#123;  </div><div class="line">                    NetWorkUtils.getHtmlPage(activity,comic_link,handler);<span class="comment">//获取网页数据  </span></div><div class="line">                &#125;  </div><div class="line">            &#125;.run();  </div><div class="line">        &#125;  </div><div class="line">    &#125;  </div><div class="line"></div><div class="line"></div><div class="line">    <span class="keyword">private</span> <span class="keyword">float</span> Sy = <span class="number">0</span>,Ey = <span class="number">0</span>;<span class="comment">//放在外面是为了更新sy的值，让滑动更加顺滑  </span></div><div class="line">    <span class="comment">/**</span></div><div class="line">     * 控制板的触摸事件监听，用来处理滑动冲突（控制面板与recyclerView的滑动冲突）</div><div class="line">     */  </div><div class="line">    View.OnTouchListener ctrl_touchlistenner = <span class="keyword">new</span> View.OnTouchListener()&#123;  </div><div class="line">        <span class="meta">@Override</span>  </div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="keyword">boolean</span> <span class="title">onTouch</span><span class="params">(View v,MotionEvent event)</span></span>&#123;  </div><div class="line">            <span class="keyword">switch</span>(event.getAction())  </div><div class="line">            &#123;  </div><div class="line">                <span class="keyword">case</span> MotionEvent.ACTION_DOWN:  </div><div class="line">                    Sy = event.getY();  </div><div class="line">                    <span class="comment">//Log.i(TAG,"onTouch: 按下事件 "+Sy);  </span></div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">                <span class="keyword">case</span> MotionEvent.ACTION_MOVE:  </div><div class="line">                    Ey = event.getY();  </div><div class="line">                    <span class="keyword">float</span> res = (Ey-Sy);  </div><div class="line">                    <span class="comment">//Log.i(TAG,"onTouch: 分发事件给recyclerView 移动距离为 "+res);  </span></div><div class="line">                    <span class="comment">//让RecyclerView开始滑动  </span></div><div class="line">                    mContentView.scrollBy(mContentView.getScrollX(),mContentView.getScrollY()-(<span class="keyword">int</span>)res);  </div><div class="line">                    Sy = event.getY();<span class="comment">//更新开始位置  </span></div><div class="line">                    <span class="keyword">break</span>;  </div><div class="line">            &#125;  </div><div class="line">            <span class="keyword">return</span> <span class="keyword">false</span>;  </div><div class="line">        &#125;  </div><div class="line">    &#125;;  </div><div class="line"></div><div class="line">    <span class="comment">/**</span></div><div class="line">     * seekBar值改变的监听</div><div class="line">     */  </div><div class="line">    SeekBar.OnSeekBarChangeListener seekChangerListener = <span class="keyword">new</span> SeekBar.OnSeekBarChangeListener()&#123;  </div><div class="line">        <span class="meta">@Override</span>  </div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">onProgressChanged</span><span class="params">(SeekBar seekBar,<span class="keyword">int</span> progress,<span class="keyword">boolean</span> fromUser)</span></span>&#123;  </div><div class="line">            <span class="comment">//更新辅助面板  </span></div><div class="line">            <span class="keyword">if</span>(bottom_seekBar_help.getVisibility()==View.VISIBLE) &#123;  </div><div class="line">                seekBar_help_now.setText(progress + <span class="number">1</span>+<span class="string">""</span>);  </div><div class="line">            &#125;  </div><div class="line">        &#125;  </div><div class="line"></div><div class="line">        <span class="meta">@Override</span>  </div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">onStartTrackingTouch</span><span class="params">(SeekBar seekBar)</span></span>&#123;  </div><div class="line">            <span class="comment">//显示辅助面板  </span></div><div class="line">            bottom_seekBar_help.setVisibility(View.VISIBLE);  </div><div class="line">            seekBar_help_num.setText(seekBar.getMax()+<span class="number">1</span>+<span class="string">""</span>);<span class="comment">//设置总数  </span></div><div class="line">        &#125;  </div><div class="line"></div><div class="line">        <span class="meta">@Override</span>  </div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">onStopTrackingTouch</span><span class="params">(SeekBar seekBar)</span></span>&#123;  </div><div class="line">            <span class="comment">//关闭辅助面板  </span></div><div class="line">            bottom_seekBar_help.setVisibility(View.GONE);  </div><div class="line">            <span class="keyword">int</span> progress = seekBar.getProgress();  </div><div class="line">            Log.i(TAG,<span class="string">"onProgressChanged: 选择了，第"</span>+progress);  </div><div class="line">            <span class="comment">//设置图片状态（1/9）;  </span></div><div class="line">            adapterNowPos = progress;  </div><div class="line">            setpicText();  </div><div class="line">            mContentView.scrollToPosition(adapterNowPos);<span class="comment">//不能平稳滑动，否者联动出错  </span></div><div class="line">        &#125;  </div><div class="line">    &#125;;  </div><div class="line"></div><div class="line">    <span class="comment">/**</span></div><div class="line">     * 设置图片文字（第几张/总共几张）</div><div class="line">     */  </div><div class="line">    <span class="function"><span class="keyword">void</span> <span class="title">setpicText</span><span class="params">()</span>  </span></div><div class="line">    &#123;  </div><div class="line">        String s = adapterNowPos+<span class="number">1</span>+ <span class="string">"/"</span> + allItems;  </div><div class="line">        comic_pic_state.setText(s);<span class="comment">//设置图片的数量  </span></div><div class="line">        pic_state_top.setText(s);  </div><div class="line">    &#125;  </div><div class="line">    <span class="comment">/**</span></div><div class="line">     * 展示上下栏</div><div class="line">     */  </div><div class="line">    <span class="function"><span class="keyword">void</span> <span class="title">showPanel</span><span class="params">()</span>  </span></div><div class="line">    &#123;  </div><div class="line">        <span class="comment">//Log.i(TAG,"hidePanel: 显示");  </span></div><div class="line">        TranslateAnimation translateAnimation = <span class="keyword">new</span> TranslateAnimation(Animation.RELATIVE_TO_SELF,<span class="number">0.0f</span>,Animation.RELATIVE_TO_SELF,<span class="number">0.0f</span>,Animation.RELATIVE_TO_SELF,<span class="number">1.0f</span>,Animation.RELATIVE_TO_SELF,<span class="number">0.0f</span>);  </div><div class="line">        TranslateAnimation translateAnimation1 = <span class="keyword">new</span> TranslateAnimation(Animation.RELATIVE_TO_SELF, <span class="number">0.0f</span>,  </div><div class="line">                Animation.RELATIVE_TO_SELF, <span class="number">0.0f</span>, Animation.RELATIVE_TO_SELF,  </div><div class="line">                -<span class="number">1.0f</span>, Animation.RELATIVE_TO_SELF, <span class="number">0.0f</span>);  </div><div class="line">        translateAnimation.setDuration(UI_ANIMATION_DELAY);  </div><div class="line">        translateAnimation1.setDuration(UI_ANIMATION_DELAY);  </div><div class="line">        toplayout.setAnimation(translateAnimation1);  </div><div class="line">        bottomlayout.setAnimation(translateAnimation);  </div><div class="line">        toplayout.setVisibility(View.VISIBLE);<span class="comment">//这里通过改变可见性来播放动画  </span></div><div class="line">        bottomlayout.setVisibility(View.VISIBLE);<span class="comment">//这里通过改变可见性来播放动画  </span></div><div class="line">        <span class="comment">//底部状态栏消失  </span></div><div class="line">        small_status.setVisibility(View.GONE);  </div><div class="line">        <span class="comment">//隐藏上下操作板，注意只能是隐藏，不能GONE，否者会导致中间控制板占据所有屏幕的问题  </span></div><div class="line">        nextToogle.setVisibility(View.INVISIBLE);  </div><div class="line">        preToogle.setVisibility(View.INVISIBLE);  </div><div class="line">    &#125;  </div><div class="line"></div><div class="line">    <span class="comment">/**</span></div><div class="line">     * 隐藏上下栏</div><div class="line">     */  </div><div class="line">    <span class="function"><span class="keyword">void</span> <span class="title">hidePanel</span><span class="params">()</span>  </span></div><div class="line">    &#123;  </div><div class="line">        <span class="comment">//Log.i(TAG,"hidePanel: 隐藏");  </span></div><div class="line">        TranslateAnimation translateAnimation = <span class="keyword">new</span> TranslateAnimation(Animation.RELATIVE_TO_SELF,<span class="number">0.0f</span>,  </div><div class="line">                Animation.RELATIVE_TO_SELF,<span class="number">0.0f</span>,Animation.RELATIVE_TO_SELF,<span class="number">0.0f</span>,Animation.RELATIVE_TO_SELF,-<span class="number">1.0f</span>);  </div><div class="line">        TranslateAnimation translateAnimation1 = <span class="keyword">new</span> TranslateAnimation(Animation.RELATIVE_TO_SELF, <span class="number">0.0f</span>,  </div><div class="line">                Animation.RELATIVE_TO_SELF, <span class="number">0.0f</span>, Animation.RELATIVE_TO_SELF,  </div><div class="line">                <span class="number">0.0f</span>, Animation.RELATIVE_TO_SELF, <span class="number">1.0f</span>);  </div><div class="line">        translateAnimation.setDuration(UI_ANIMATION_DELAY);  </div><div class="line">        translateAnimation1.setDuration(UI_ANIMATION_DELAY);  </div><div class="line">        toplayout.setAnimation(translateAnimation);  </div><div class="line">        bottomlayout.setAnimation(translateAnimation1);  </div><div class="line">        toplayout.setVisibility(View.INVISIBLE);<span class="comment">//这里通过改变可见性来播放动画  </span></div><div class="line">        bottomlayout.setVisibility(View.INVISIBLE);<span class="comment">//这里通过改变可见性来播放动画  </span></div><div class="line">        <span class="comment">//底部状态栏显示  </span></div><div class="line">        small_status.setVisibility(View.VISIBLE);  </div><div class="line">        <span class="comment">//显示上下操作板  </span></div><div class="line">        nextToogle.setVisibility(View.VISIBLE);  </div><div class="line">        preToogle.setVisibility(View.VISIBLE);  </div><div class="line">    &#125;  </div><div class="line"></div><div class="line">    <span class="comment">/**</span></div><div class="line">     * 触发器用来控制显示与隐藏</div><div class="line">     */  </div><div class="line">    <span class="function"><span class="keyword">void</span> <span class="title">toogle</span><span class="params">()</span>  </span></div><div class="line">    &#123;  </div><div class="line">        <span class="keyword">if</span>(mVisible)  </div><div class="line">        &#123;  </div><div class="line">            hidePanel();  </div><div class="line">            mVisible = <span class="keyword">false</span>;  </div><div class="line">        &#125;  </div><div class="line">        <span class="keyword">else</span>  </div><div class="line">        &#123;  </div><div class="line">            showPanel();  </div><div class="line">            mVisible = <span class="keyword">true</span>;  </div><div class="line">        &#125;  </div><div class="line">    &#125;  </div><div class="line"></div><div class="line">    <span class="meta">@Override</span>  </div><div class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">onClick</span><span class="params">(View v)</span></span>&#123;  </div><div class="line">        <span class="keyword">switch</span>(v.getId())  </div><div class="line">        &#123;  </div><div class="line">            <span class="keyword">case</span> R.id.back_btn:<span class="comment">//返回按钮  </span></div><div class="line">                onBackPressed();<span class="comment">//调用返回  </span></div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.show_menuBtn:<span class="comment">//显示操作平台按钮  </span></div><div class="line">                <span class="comment">//Log.i(TAG,"onClick: 操作平台按钮");  </span></div><div class="line">                <span class="keyword">if</span>(View.GONE == menu_content.getVisibility()) &#123;  </div><div class="line">                    menu_content.setVisibility(View.VISIBLE);  </div><div class="line">                    hidePanel();  </div><div class="line">                    mVisible = <span class="keyword">false</span>;  </div><div class="line">                    <span class="comment">//底部状态栏消失  </span></div><div class="line">                    small_status.setVisibility(View.GONE);  </div><div class="line">                &#125;  </div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.feed_backBtn:<span class="comment">//反馈按钮  </span></div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.downloadpic_Btn:<span class="comment">//下载此张图片按钮  </span></div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.sharePicBtn:<span class="comment">//分享漫画链接或者此张图片  </span></div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.toogle:  </div><div class="line">                <span class="comment">//Log.i(TAG,"onClick: 隐藏按钮按下");  </span></div><div class="line">                toogle();  </div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.nextHUAText:<span class="comment">//下一张图片  </span></div><div class="line">                adapterNowPos++;  </div><div class="line">                scroolRV_To(adapterNowPos);  </div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.preHUAText:<span class="comment">//上一张图片  </span></div><div class="line">                adapterNowPos--;  </div><div class="line">                scroolRV_To(adapterNowPos);  </div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.menu_content:<span class="comment">//操作面板容器  </span></div><div class="line">                menu_content.setVisibility(View.GONE);  </div><div class="line">                <span class="comment">//底部状态栏显示  </span></div><div class="line">                small_status.setVisibility(View.GONE);  </div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.indexBtn:<span class="comment">//目录按钮  </span></div><div class="line">                <span class="comment">//目录界面  </span></div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.download_comic_Btn:<span class="comment">//下载漫画按钮  </span></div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.light_btn:<span class="comment">//亮度按钮  </span></div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.phone_switch:<span class="comment">//切换手机的横竖屏  </span></div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">            <span class="keyword">case</span> R.id.options_btn:<span class="comment">//选项按钮  </span></div><div class="line">                <span class="keyword">break</span>;  </div><div class="line">        &#125;  </div><div class="line">    &#125;  </div><div class="line"></div><div class="line">    <span class="comment">/**</span></div><div class="line">     * 滚动到位置</div><div class="line">     * <span class="doctag">@param</span> pos</div><div class="line">     */  </div><div class="line">    <span class="function"><span class="keyword">void</span> <span class="title">scroolRV_To</span><span class="params">(<span class="keyword">int</span> pos)</span>  </span></div><div class="line">    &#123;  </div><div class="line">        <span class="keyword">if</span>(adapterNowPos&gt;=allItems)  </div><div class="line">        &#123;  </div><div class="line">            adapterNowPos = allItems;  </div><div class="line">            Toast.makeText(<span class="keyword">this</span>,<span class="string">"已经到顶啦！"</span>,Toast.LENGTH_SHORT);  </div><div class="line">        &#125;  </div><div class="line">        <span class="keyword">else</span> <span class="keyword">if</span>(adapterNowPos &lt;= <span class="number">0</span>)  </div><div class="line">        &#123;  </div><div class="line">            adapterNowPos = <span class="number">0</span>;  </div><div class="line">            Toast.makeText(<span class="keyword">this</span>,<span class="string">"已经到底啦！"</span>,Toast.LENGTH_SHORT);  </div><div class="line">        &#125;  </div><div class="line">        mContentView.smoothScrollToPosition(adapterNowPos);  </div><div class="line">    &#125;  </div><div class="line"></div><div class="line">    <span class="comment">/**</span></div><div class="line">     * 图片显示view的adapter</div><div class="line">     */  </div><div class="line">    <span class="class"><span class="keyword">class</span> <span class="title">MyContentViewAdapter</span> <span class="keyword">extends</span> <span class="title">RecyclerView</span>.<span class="title">Adapter</span>  </span></div><div class="line">    &#123;  </div><div class="line"></div><div class="line">        <span class="keyword">private</span> ArrayList&lt;String&gt; pics;  </div><div class="line">        <span class="keyword">private</span> Context context;  </div><div class="line"></div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="title">MyContentViewAdapter</span><span class="params">(ArrayList&lt;String&gt; pics)</span></span>&#123;  </div><div class="line">            <span class="keyword">this</span>.pics = pics;  </div><div class="line">        &#125;  </div><div class="line"></div><div class="line">        <span class="meta">@Override</span>  </div><div class="line">        <span class="keyword">public</span> RecyclerView.<span class="function">ViewHolder <span class="title">onCreateViewHolder</span><span class="params">(ViewGroup parent,<span class="keyword">int</span> viewType)</span></span>&#123;  </div><div class="line">            context = parent.getContext();  </div><div class="line">            View view = LayoutInflater.from(context)  </div><div class="line">                    .inflate(R.layout.comicpics_item,parent,<span class="keyword">false</span>);  </div><div class="line">            <span class="keyword">return</span> <span class="keyword">new</span> MyViewHolder(view);  </div><div class="line">        &#125;  </div><div class="line"></div><div class="line">        <span class="meta">@Override</span>  </div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">onBindViewHolder</span><span class="params">(RecyclerView.ViewHolder holder,<span class="keyword">int</span> position)</span></span>&#123;  </div><div class="line">            MyViewHolder myViewHolder = (MyViewHolder)holder;  </div><div class="line">            myViewHolder.textView.setText(position+<span class="number">1</span>+<span class="string">""</span>);<span class="comment">//设置占位  </span></div><div class="line">            Glide.with(context)  </div><div class="line">                    .load(pics.get(position))  </div><div class="line">                    .into(myViewHolder.imageView);  </div><div class="line">        &#125;  </div><div class="line"></div><div class="line">        <span class="meta">@Override</span>  </div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="keyword">int</span> <span class="title">getItemCount</span><span class="params">()</span></span>&#123;  </div><div class="line">            <span class="keyword">return</span> pics.size();  </div><div class="line">        &#125;  </div><div class="line"></div><div class="line">        <span class="class"><span class="keyword">class</span> <span class="title">MyViewHolder</span> <span class="keyword">extends</span> <span class="title">RecyclerView</span>.<span class="title">ViewHolder</span></span>&#123;  </div><div class="line">            <span class="keyword">private</span> View rootView;  </div><div class="line">            <span class="keyword">private</span> ImageView imageView;  </div><div class="line">            <span class="keyword">private</span> TextView textView;  </div><div class="line">            <span class="function"><span class="keyword">public</span> <span class="title">MyViewHolder</span><span class="params">(View itemView)</span></span>&#123;  </div><div class="line">                <span class="keyword">super</span>(itemView);  </div><div class="line">                rootView = itemView;  </div><div class="line">                imageView = (ImageView)rootView.findViewById(R.id.imageView);  </div><div class="line">                textView = (TextView)rootView.findViewById(R.id.textView);  </div><div class="line">            &#125;  </div><div class="line">        &#125;  </div><div class="line">    &#125;  </div><div class="line">    <span class="keyword">public</span> BroadcastReceiver batterReceiver  = <span class="keyword">new</span> BroadcastReceiver()&#123;  </div><div class="line">        <span class="meta">@Override</span>  </div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">onReceive</span><span class="params">(Context context,Intent intent)</span></span>&#123;  </div><div class="line">            <span class="keyword">int</span> level = intent.getIntExtra(<span class="string">"level"</span>,<span class="number">0</span>);  </div><div class="line">            <span class="comment">//Log.i(TAG,"onReceive: "+level);  </span></div><div class="line">            battery.setText(level+<span class="string">"%"</span>);  </div><div class="line">        &#125;  </div><div class="line">    &#125;;  </div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h4 id="文章到此结束，欢迎到我的项目地址或者新博客看看。"><a href="#文章到此结束，欢迎到我的项目地址或者新博客看看。" class="headerlink" title="文章到此结束，欢迎到我的项目地址或者新博客看看。"></a>文章到此结束，欢迎到我的项目地址或者新博客看看。</h4>
      
    </div>

    <div>
      
        
<div id="wechat_subscriber" style="display: block; padding: 10px 0; margin: 20px auto; width: 100%; text-align: center">
    <img id="wechat_subscriber_qcode" src="http://on792ofrp.bkt.clouddn.com/17-3-22/89969433-file_1490159480281_107f8.jpg" alt="WinterSmileSB101 wechat" style="width: 200px; max-width: 100%;"/>
    <div>欢迎关注我的微信公众帐号，不定期推送各种技术文章</div>
</div>


      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        
  <ul class="post-copyright">
    <li class="post-copyright-author">
      <strong>本文作者：</strong>
      WinterSmileSB101
    </li>
    <li class="post-copyright-link">
      <strong>本文链接：</strong>
      <a href="http://WinterSmileSB101.online/2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/" title="漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）">http://WinterSmileSB101.online/2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/</a>
    </li>
    <li class="post-copyright-license">
      <strong>版权声明： </strong>
      本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/" rel="external nofollow" target="_blank">CC BY-NC-SA 3.0</a> 许可协议。转载请注明出处！
    </li>
  </ul>


      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Android/" rel="tag"># Android</a>
          
            <a href="/tags/UI/" rel="tag"># UI</a>
          
            <a href="/tags/界面/" rel="tag"># 界面</a>
          
            <a href="/tags/漫吧/" rel="tag"># 漫吧</a>
          
            <a href="/tags/Cartoon8/" rel="tag"># Cartoon8</a>
          
        </div>
      

      
        
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（下）/" rel="next" title="漫吧漫画阅读界面的搭建（一）基础布局搭建（下）">
                <i class="fa fa-chevron-left"></i> 漫吧漫画阅读界面的搭建（一）基础布局搭建（下）
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/03/22/通过OnScrollListener来监听RecyclerView的位置/" rel="prev" title="通过OnScrollListener来监听RecyclerView的位置，以更新RV">
                通过OnScrollListener来监听RecyclerView的位置，以更新RV <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
        <div class="ds-share flat" data-thread-key="2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/"
     data-title="漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）"
     data-content=""
     data-url="http://WinterSmileSB101.online/2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/">
  <div class="ds-share-inline">
    <ul  class="ds-share-icons-16">

      <li data-toggle="ds-share-icons-more"><a class="ds-more" href="javascript:void(0);">分享到：</a></li>
      <li><a class="ds-weibo" href="javascript:void(0);" data-service="weibo">微博</a></li>
      <li><a class="ds-qzone" href="javascript:void(0);" data-service="qzone">QQ空间</a></li>
      <li><a class="ds-qqt" href="javascript:void(0);" data-service="qqt">腾讯微博</a></li>
      <li><a class="ds-wechat" href="javascript:void(0);" data-service="wechat">微信</a></li>

    </ul>
    <div class="ds-share-icons-more">
    </div>
  </div>
</div>
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
      <div class="ds-thread" data-thread-key="2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/"
           data-title="漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）" data-url="http://WinterSmileSB101.online/2017/03/22/漫吧漫画阅读界面的搭建（一）基础布局搭建（完整代码）/">
      </div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="http://on792ofrp.bkt.clouddn.com/17-3-22/29073846-file_1490159480452_d2de.jpg"
               alt="WinterSmileSB101" />
          <p class="site-author-name" itemprop="name">WinterSmileSB101</p>
           
              <p class="site-description motion-element" itemprop="description"></p>
           
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">52</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              <a href="/categories/index.html">
                <span class="site-state-item-count">26</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">113</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        
          <div class="feed-link motion-element">
            <a href="http://blog.csdn.net/qq_21265915/rss/list" rel="alternate">
              <i class="fa fa-rss"></i>
              RSS
            </a>
          </div>
        

        <!--自己写的社交链接-->
        <div class="links-of-author motion-element">
         <span class="links-of-author-item">
         <a href="https://github.com/WinterSmileSB101" title="Github">
         <i class="fa fa-fw fa-github fa-lg"></i>
         </a>
         </span>
         <span class="links-of-author-item">
                  <a href="http://weibo.com/5602632941/profile?rightmod=1&wvr=6&mod=personinfo&is_all=1" title="微博">
                  <i class="fa fa-fw fa-weibo fa-lg"></i>
                  </a>
                  </span>
         <span class="links-of-author-item">
         <a href="http://www.jianshu.com/users/73344bc7e890/timeline" title="简书">
         <i class="fa fa-fw fa-bookmark fa-lg"></i>
         </a>
         </span>
<br />
        <span class="links-of-author-item">
                 <a href="https://www.douban.com/people/159359470/" title="豆瓣">
                 <i class="fa fa-fw fa-newspaper-o fa-lg"></i>
                 </a>
                 </span>
        <span class="links-of-author-item">
                 <a href="http://blog.csdn.net/qq_21265915" title="CSDN博客">
                 <i class="fa fa-fw fa-bug fa-lg"></i>
                 </a>
                 </span>
        </div>
        <!--自己写的社交链接-->

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#这一篇是完整代码的展示，博文是前两篇"><span class="nav-number">1.</span> <span class="nav-text">这一篇是完整代码的展示，博文是前两篇</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#方便起见，代码都为一个文件"><span class="nav-number">2.</span> <span class="nav-text">方便起见，代码都为一个文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#布局代码："><span class="nav-number">3.</span> <span class="nav-text">布局代码：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#主布局："><span class="nav-number">4.</span> <span class="nav-text">主布局：</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#RecyclerView-item布局："><span class="nav-number">4.1.</span> <span class="nav-text">RecyclerView item布局：</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Java代码"><span class="nav-number">4.2.</span> <span class="nav-text">Java代码</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#文章到此结束，欢迎到我的项目地址或者新博客看看。"><span class="nav-number">4.3.</span> <span class="nav-text">文章到此结束，欢迎到我的项目地址或者新博客看看。</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      
        <div class="back-to-top">
          <i class="fa fa-arrow-up"></i>
          
            <span id="scrollpercent"><span>0</span>%</span>
          
        </div>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy;  2017.3.20 - 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Powered By - WinterSmileSB101</span>
</div>


<div class="powered-by">
    个人专属
</div>

<div class="theme-info">
  博客 -
  WinterSmileSB101
</div>


        

        
      </div>
    </footer>

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  



  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>

  
  <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  

  
    
  

  <script type="text/javascript">
    var duoshuoQuery = {short_name:"wintersmilesb101"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.id = 'duoshuo-script';
      ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
      || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
  </script>

  
    
      
      <script src="/lib/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script>
      <script src="/js/src/hook-duoshuo.js?v=5.1.0"></script>
    
    
    <script src="/lib/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script>
    <script src="/js/src/hook-duoshuo.js"></script>
  
















  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length == 0) {
      search_path = "search.xml";
    }
    var path = "/" + search_path;
    // monitor main search box;

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.popup').toggle();
    }
    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';
      $.ajax({
        url: path,
        dataType: "xml",
        async: true,
        success: function( xmlResponse ) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = $( "entry", xmlResponse ).map(function() {
            return {
              title: $( "title", this ).text(),
              content: $("content",this).text(),
              url: $( "url" , this).text()
            };
          }).get();
          var $input = document.getElementById(search_id);
          var $resultContent = document.getElementById(content_id);
          $input.addEventListener('input', function(){
            var matchcounts = 0;
            var str='<ul class=\"search-result-list\">';
            var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
            $resultContent.innerHTML = "";
            if (this.value.trim().length > 1) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var content_index = [];
                var data_title = data.title.trim().toLowerCase();
                var data_content = data.content.trim().replace(/<[^>]+>/g,"").toLowerCase();
                var data_url = decodeURIComponent(data.url);
                var index_title = -1;
                var index_content = -1;
                var first_occur = -1;
                // only match artiles with not empty titles and contents
                if(data_title != '') {
                  keywords.forEach(function(keyword, i) {
                    index_title = data_title.indexOf(keyword);
                    index_content = data_content.indexOf(keyword);
                    if( index_title >= 0 || index_content >= 0 ){
                      isMatch = true;
                      if (i == 0) {
                        first_occur = index_content;
                      }
                    }

                  });
                }
                // show search results
                if (isMatch) {
                  matchcounts += 1;
                  str += "<li><a href='"+ data_url +"' class='search-result-title'>"+ data_title +"</a>";
                  var content = data.content.trim().replace(/<[^>]+>/g,"");
                  if (first_occur >= 0) {
                    // cut out 100 characters
                    var start = first_occur - 20;
                    var end = first_occur + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if(start == 0){
                      end = 50;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    var match_content = content.substring(start, end);
                    // highlight all keywords
                    keywords.forEach(function(keyword){
                      var regS = new RegExp(keyword, "gi");
                      match_content = match_content.replace(regS, "<b class=\"search-keyword\">"+keyword+"</b>");
                    });

                    str += "<p class=\"search-result\">" + match_content +"...</p>"
                  }
                  str += "</li>";
                }
              })};
            str += "</ul>";
            if (matchcounts == 0) { str = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>' }
            if (keywords == "") { str = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>' }
            $resultContent.innerHTML = str;
          });
          proceedsearch();
        }
      });}

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched == false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(function(e){
      $('.popup').hide();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    });
    $('.popup').click(function(e){
      e.stopPropagation();
    });
  </script>





  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
  <script>AV.initialize("cOFi0858xVYxKW1wnErxqEra-gzGzoHsz", "7LaqqR82XnjzTbkv5eCKw5aW");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  

  

</body>
</html>
